<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
    <title>列表渲染</title>
</head>

<body>
    <div id="root">
        <!-- 遍历数组-人员列表 -->
        <lu>
            <li v-for="(people,index) in peoples" :key="index">
                {{people.name}}-----{{people.age}}
            </li>
        </lu>
        <!-- 遍历对象-汽车信息 -->
        <lu>
            <li v-for="(c,index) in car" :key="index">
                {{c}}-----{{index}}
            </li>
        </lu>
        <!-- 遍历字符串 -->
        <lu>
            <li v-for="(s,index) in string" :key="index">
                {{s}}-----{{index}}
            </li>
        </lu>
    </div>
    <script>
        new Vue({
            el: '#root',
            data: {
                peoples: [{
                    id: '001',
                    name: '张三',
                    age: '20'
                }, {
                    id: '002',
                    name: '李四',
                    age: '21'
                }, {
                    id: '003',
                    name: '王五',
                    age: '22'
                }, {
                    id: '004',
                    name: '赵六',
                    age: '23'
                }],
                car: {
                    name: '虎头奔',
                    type: 'e300'


                },
                string: 'hello'
            }
        })
    </script>
</body>

</html>